﻿package mortal.game.view.mainUI.avatar
{
    import Message.DB.Tables.*;
    import Message.Game.*;
    import Message.Public.*;
    import __AS3__.vec.*;
    import com.gengine.global.*;
    import com.gengine.utils.*;
    import com.greensock.*;
    import com.greensock.easing.*;
    import com.mui.controls.*;
    import com.mui.manager.*;
    import com.mui.utils.*;
    import extend.language.*;
    import fl.data.*;
    import flash.events.*;
    import flash.text.*;
    import flash.utils.*;
    import mortal.common.*;
    import mortal.common.global.*;
    import mortal.component.gconst.*;
    import mortal.game.cache.*;
    import mortal.game.events.*;
    import mortal.game.manager.*;
    import mortal.game.mvc.*;
    import mortal.game.resource.*;
    import mortal.game.scene3D.layer3D.utils.*;
    import mortal.game.scene3D.map3D.*;
    import mortal.game.utils.*;
    import mortal.game.view.common.*;
    import mortal.game.view.common.util.*;
    import mortal.game.view.mainUI.roleAvatar.*;
    import mortal.game.view.platform.*;
    import mortal.game.view.platform.platformTencent.*;
    import mortal.game.view.vip.*;
    import mortal.mvc.core.*;

    public class AvatarModule extends View
    {
        private var _cache:RoleCache;
        private var _capTainIcon:GBitmap;
        private var _vipBtn:GLoadedButton;
        private var _rechargeBtn:GLoadedButton;
        private var _vipLevel:GImageBitmap;
        private var _qqIcon:GImageBitmap;
        private var _vipExperienceBtn:GLoadingButton;
        private var _vipExperienceSp:GSprite;
        private var _leftTime:SecTimerView;
        private var _leftTimeTxt:GTextFiled;
        private var _avatar:RoleAvatar;
        private var _bmpYuanbao:GBitmap;
        private var _bmpYuanbaoBind:GBitmap;
        private var _goldBindText:GTextFiled;
        private var _goldText:GTextFiled;
        private var _fangBtn:GLoadedButton;
        private var _beiBtn:GLoadedButton;
        private var _GMbtn:GLoadedButton;
        private var _fightModeBtn:GLoadedButton;
        private var _fightModePanel:GSprite;
        private var _fightModeList:GTileList;
        private var _mainCityExpSp:ToolTipSprite;
        private var _delayTimer:Timer;
        private var _mainCityExpIcon:GImageBitmap;
        private var _ltTxt:GTextFiled;
        private var _lt:SecTimerView;
        public static var moneyTypeArr:Array = [EPriceUnit._EPriceUnitGold, EPriceUnit._EPriceUnitGoldBind, EPriceUnit._EPriceUnitCoin, EPriceUnit._EPriceUnitCoinBind, EPriceUnit._EPriceUnitVitalEnergy, EPriceUnit._EPriceUnitHonor, EPriceUnit._EPriceUnitExploit, EPriceUnit._EPriceUnitArenaBronze, EPriceUnit._EPriceUnitArenaSilver, EPriceUnit._EPriceUnitArenaGold, EPriceUnit._EPriceUnitArenaJewel, EPriceUnit._EPriceUnitArenaSJewel, EPriceUnit._EPriceUnit50GoldPoint, EPriceUnit._EPriceUnit70GoldPoint, EPriceUnit._EPriceUnit90GoldPoint, EPriceUnit._EPriceUnitArena2Bronze, EPriceUnit._EPriceUnitArena2Silver, EPriceUnit._EPriceUnitArena2Gold, EPriceUnit._EPriceUnitArena2Jewel, EPriceUnit._EPriceUnitArena2SJewel];

        public function AvatarModule()
        {
            this._cache = Cache.instance.role;
            this.layer = LayerManager.uiLayer;
            this.setSize(270, 95);
            return;
        }// end function

        override protected function configUI() : void
        {
            var qqSpr:ToolTipSprite;
            super.configUI();
            UIFactory.gBitmap(ImagesConst.AvatarCombatBg, 95, 12, this);
            var textFormat:* = GlobalStyle.textFormatHui;
            textFormat.size = 14;
            textFormat.align = TextFormatAlign.CENTER;
            textFormat.color = GlobalStyle.colorHuangUint;
            this._avatar = new RoleAvatar();
            this._avatar.isHideDispose = false;
            this.addChild(this._avatar);
            textFormat = GlobalStyle.textFormatBai.left();
            this._goldText = UIFactory.gTextField("", 120, 87, 100, 20, this, textFormat);
            this._goldText.toolTipData = this.getMoneyTips;
            this._goldBindText = UIFactory.gTextField("", 195, 87, 100, 20, this, textFormat);
            this._goldBindText.toolTipData = this.getMoneyTips;
            this._bmpYuanbao = UIFactory.gBitmap(ImagesConst.Yuanbao, 100, 85, this);
            this._bmpYuanbaoBind = UIFactory.gBitmap(ImagesConst.Yuanbao_bind, 175, 85, this);
            this._capTainIcon = UIFactory.gBitmap(ImagesConst.SmallCatain, 3, 10, null);
            this._fangBtn = UIFactory.gLoadedButton(ImagesConst.Fang_upSkin, 10, 100, 27, 28, this);
            this._fangBtn.configEventListener(MouseEvent.CLICK, this.onFangBtnClickHandler);
            this._fangBtn.toolTipData = Language.getString(35002);
            this._fightModeBtn = UIFactory.gLoadedButton("FightMode" + (this._cache.playerInfo.mode + 1) + "_upSkin", 70, 110, 27, 28, this);
            this._fightModeBtn.toolTipData = Language.getStringByParam(30506, GameDefConfig.instance.getFightModeName(this._cache.playerInfo.mode));
            this._fightModeBtn.addEventListener(MouseEvent.CLICK, this.showFightModeList);
            this._fightModePanel = UICompomentPool.getUICompoment(GSprite);
            this._fightModePanel.x = 95;
            this._fightModePanel.y = 120;
            this._fightModePanel.mouseEnabled = true;
            this._fightModeList = UIFactory.tileList(4, 4, 290, 66, this._fightModePanel);
            this._fightModeList.columnWidth = 290;
            this._fightModeList.rowHeight = 30;
            this._fightModeList.horizontalGap = 1;
            this._fightModeList.verticalGap = 2;
            this._fightModeList.setStyle("cellRenderer", FightModeCellRenderer);
            this._fightModeList.dataProvider = this.getDataProvider();
            UIFactory.bg(0, 0, 300, this._fightModeList.height + 5, this._fightModePanel, ImagesConst.ToolTipBg);
            UIFactory.bg(0, 34, 300, 2, this._fightModePanel, ImagesConst.SplitLine);
            this._fightModePanel.addChild(this._fightModeList);
            this._GMbtn = UIFactory.gLoadedButton(ImagesConst.GM_upSkin, 40, 110, 27, 28, this);
            this._GMbtn.configEventListener(MouseEvent.CLICK, this.onShowComplainWindow);
            this._GMbtn.toolTipData = Language.getString(35001);
            if (PlatformConst.isQQ())
            {
                var qqVipViewShow:* = function (event:MouseEvent) : void
            {
                Dispatcher.dispatchEvent(new Event(EventName.PlatformTencentShow));
                return;
            }// end function
            ;
                this._vipBtn = UIFactory.gLoadedButton(ImagesConst.VipQQbtn_upSkin, 202, 32, 46, 20, this);
                this._vipBtn.toolTipData = Language.getString(35355);
                this._vipBtn.addEventListener(MouseEvent.CLICK, this.openVipWin);
                this._vipLevel = UIFactory.gImageBitmap("", 0, 0, null, this.resetVipPos);
                qqSpr = UICompomentPool.getUICompoment(ToolTipSprite);
                qqSpr.mouseChildren = false;
                qqSpr.mouseEnabled = true;
                qqSpr.buttonMode = true;
                this.addChild(qqSpr);
                if (PlatformTencentUtil.isBlueEnter())
                {
                    qqSpr.toolTipData = PlatformTencentUtil.getLanZuanTips;
                }
                this._qqIcon = UIFactory.gImageBitmap("", 16 - 2, 16 - 9, qqSpr, this.resetVipPos);
                qqSpr.configEventListener(MouseEvent.CLICK, qqVipViewShow);
                Dispatcher.addEventListener(EventName.PlatformQQVipInfoGet, this.addQQVipIcon);
            }
            else
            {
                this._vipBtn = UIFactory.gLoadedButton(ImagesConst.AvatarVIP_upSkin, 202, 32, 46, 20, this);
                this._vipBtn.toolTipData = Language.getString(35003);
                this._vipBtn.addEventListener(MouseEvent.CLICK, this.openVipWin);
                this._vipLevel = UIFactory.gImageBitmap("", 0, 0, this, this.resetVipPos);
            }
            this._rechargeBtn = UIFactory.gLoadedButton(ImagesConst.AvatarRechargeBtn_upSkin, 252, 32, 46, 20, this);
            this._rechargeBtn.addEventListener(MouseEvent.CLICK, this.gotoRecharge);
            this.updateMoney();
            this.updateVipLevel();
            NetDispatcher.addCmdListener(ServerCommand.MainCityExpActInfo, this.showMainCityExpAddition);
            return;
        }// end function

        private function addQQVipIcon(event:Event) : void
        {
            var _loc_2:String = null;
            if (PlatformTencentUtil.getVipLevel() > 0)
            {
                _loc_2 = PlatformTencentUtil.getQQVipIconUrl();
                this._qqIcon.imgUrl = _loc_2;
            }
            return;
        }// end function

        private function resetVipPos() : void
        {
            this._vipLevel.x = this._vipBtn.x + (this._vipBtn.width - this._vipLevel.width) * 0.5;
            this._vipLevel.y = this._vipBtn.y + (this._vipBtn.height - this._vipLevel.height) * 0.5;
            return;
        }// end function

        private function getMoneyTips() : String
        {
            var _loc_1:String = "";
            var _loc_2:* = Cache.instance.role;
            var _loc_3:int = 0;
            while (_loc_3 < moneyTypeArr.length)
            {
                
                _loc_1 = _loc_1 + (GameDefConfig.instance.getEPrictUnitName2(moneyTypeArr[_loc_3]) + " : <font color=\'#1ccc31\' >" + _loc_2.getMoneyByType(moneyTypeArr[_loc_3]) + "</font>\n");
                _loc_3++;
            }
            return _loc_1;
        }// end function

        private function gotoRecharge(event:MouseEvent) : void
        {
            GameUtil.gotoRecharge(ModuleTypeConst.RoleAvatar);
            return;
        }// end function

        private function openVipWin(event:MouseEvent) : void
        {
            Dispatcher.dispatchEvent(new DataEvent(EventName.VipWinOpen));
            return;
        }// end function

        private function getDataProvider() : DataProvider
        {
            var _loc_2:int = 0;
            var _loc_3:Object = null;
            var _loc_1:* = new DataProvider();
            while (_loc_2 < 2)
            {
                
                _loc_3 = {data:_loc_2};
                _loc_1.addItem(_loc_3);
                _loc_2++;
            }
            return _loc_1;
        }// end function

        private function onShowComplainWindow(event:MouseEvent) : void
        {
            var _loc_2:* = ParamsConst.instance.gmUrl;
            if (_loc_2 != null && _loc_2 != "")
            {
                BrowerUtil.getUrl(_loc_2);
            }
            else
            {
                GameManager.instance.popupModuleType(ModuleType.GM);
            }
            return;
        }// end function

        private function onFangBtnClickHandler(event:MouseEvent) : void
        {
            if (ParamsConst.instance.proctecUrl)
            {
                BrowerUtil.getUrl(ParamsConst.instance.proctecUrl);
            }
            else
            {
                GameManager.instance.popupModuleType(ModuleType.Issm);
            }
            return;
        }// end function

        private function showFightModeList(event:MouseEvent) : void
        {
            if (!this._fightModePanel.parent)
            {
                LayerManager.toolTipLayer.addChild(this._fightModePanel);
                this._fightModeList.selectedIndex = this._cache.playerInfo.mode;
                event.stopImmediatePropagation();
                Global.stage.addEventListener(MouseEvent.CLICK, this.hideHandler);
                this._fightModePanel.configEventListener(MouseEvent.ROLL_OUT, this.hideHandler);
                this._fightModePanel.configEventListener(MouseEvent.MOUSE_OVER, this.mouseOverHandler);
                if (!this._delayTimer)
                {
                    this._delayTimer = new Timer(3000);
                    this._delayTimer.addEventListener(TimerEvent.TIMER, this.delayTimerHandler);
                    this._delayTimer.start();
                }
                else
                {
                    this._delayTimer.reset();
                    this._delayTimer.start();
                }
            }
            return;
        }// end function

        private function hideHandler(event:MouseEvent = null) : void
        {
            LayerManager.toolTipLayer.removeChild(this._fightModePanel);
            Global.stage.removeEventListener(MouseEvent.CLICK, this.hideHandler);
            this._fightModePanel.removeEventListener(MouseEvent.ROLL_OUT, this.hideHandler);
            this._fightModePanel.removeEventListener(MouseEvent.MOUSE_OVER, this.mouseOverHandler);
            this._delayTimer.stop();
            this._delayTimer.removeEventListener(TimerEvent.TIMER, this.delayTimerHandler);
            this._delayTimer = null;
            return;
        }// end function

        private function mouseOverHandler(event:MouseEvent) : void
        {
            this._delayTimer.stop();
            this._fightModePanel.removeEventListener(MouseEvent.MOUSE_OVER, this.mouseOverHandler);
            return;
        }// end function

        private function delayTimerHandler(event:TimerEvent) : void
        {
            this.hideHandler();
            return;
        }// end function

        public function setModeStyle(param1:int) : void
        {
            param1 = Cache.instance.role.playerInfo.mode;
            if (param1 != 0)
            {
                param1 = EntityRelationUtil.getMapFightMode();
            }
            this._fightModeBtn.styleName = "FightMode" + param1 + "_upSkin";
            this._fightModeBtn.toolTipData = Language.getStringByParam(30506, GameDefConfig.instance.getFightModeName(param1));
            return;
        }// end function

        public function updateBufferByBuffInfoArray(param1:Array) : void
        {
            this._avatar.updateBufferByBuffInfoArray(param1);
            return;
        }// end function

        private function removeTreeBuffWhenLeaveCopy(param1:Array) : Array
        {
            var _loc_2:Boolean = false;
            var _loc_3:Array = null;
            var _loc_4:Vector.<TreeBuff> = null;
            var _loc_5:int = 0;
            var _loc_6:BuffData = null;
            var _loc_7:TBuff = null;
            var _loc_8:int = 0;
            var _loc_9:int = 0;
            var _loc_10:Boolean = false;
            var _loc_11:int = 0;
            if (param1 && param1.length > 0)
            {
                _loc_2 = Cache.instance.copy.isInCopy;
                _loc_3 = new Array();
                _loc_4 = Cache.instance.guild.CurrentTreeBuff;
                if (_loc_4 == null)
                {
                    return param1;
                }
                _loc_5 = _loc_4.length;
                _loc_8 = param1.length;
                _loc_9 = 0;
                while (_loc_9 < _loc_8)
                {
                    
                    _loc_7 = (param1[_loc_9] as BuffData).tbuff as TBuff;
                    if (_loc_7 && _loc_7.icon != 0)
                    {
                        _loc_10 = false;
                        _loc_11 = 0;
                        while (_loc_11 < _loc_5)
                        {
                            
                            if (_loc_4[_loc_11].treeType == 1)
                            {
                                if (_loc_2 == false && _loc_4[_loc_11].buffId == _loc_7.buffId)
                                {
                                    _loc_10 = true;
                                    break;
                                }
                                else if (_loc_2 && _loc_7.copyCode && _loc_7.copyCode.indexOf(Cache.instance.copy.copyInfo.code.toString()) == -1)
                                {
                                    _loc_10 = true;
                                    break;
                                }
                            }
                            _loc_11++;
                        }
                        if (!_loc_10)
                        {
                            _loc_3.push(param1[_loc_9]);
                        }
                    }
                    _loc_9++;
                }
                if (_loc_3.length != _loc_8)
                {
                    return _loc_3;
                }
            }
            return param1;
        }// end function

        public function updateFightMode() : void
        {
            return;
        }// end function

        public function updateLevel(param1:int) : void
        {
            this._avatar.updateLevel();
            return;
        }// end function

        public function updateName(param1:String) : void
        {
            this._avatar.updateName();
            return;
        }// end function

        public function updateLife() : void
        {
            this._avatar.updateLife();
            return;
        }// end function

        public function updateMana(param1:Number, param2:Number) : void
        {
            this._avatar.updateMana();
            return;
        }// end function

        public function updateCarrer() : void
        {
            this._avatar.updateCarrer();
            return;
        }// end function

        public function upDateAllInfo() : void
        {
            this.updateLevel(this._cache.roleInfo.level);
            this.updateName(this._cache.playerInfo.name);
            this.updateCarrer();
            this.updateLife();
            this.updateMana(this._cache.entityInfo.mana, this._cache.entityInfo.maxMana);
            return;
        }// end function

        public function updateEntity() : void
        {
            this._avatar.updateEntity(this._cache.roleEntityInfo);
            this.updateCarrer();
            this.updateIssm();
            return;
        }// end function

        public function updateIssm(param1:int = -1) : void
        {
            if (param1 == -1)
            {
                param1 = this._cache.playerInfo.issm;
            }
            this._fangBtn.visible = param1 == EIssm._EIssmNotPass ? (true) : (false);
            return;
        }// end function

        public function captainChange() : void
        {
            if (Cache.instance.group.captain && EntityUtil.equal(Cache.instance.role.entityInfo.entityId, Cache.instance.group.captain))
            {
                this.addChild(this._capTainIcon);
            }
            else if (this._capTainIcon.parent)
            {
                this.removeChild(this._capTainIcon);
            }
            return;
        }// end function

        public function refreshDrugNum() : void
        {
            this._avatar.refreshDrugNum();
            return;
        }// end function

        public function setSliderValue() : void
        {
            this._avatar.setClientValue();
            return;
        }// end function

        public function updateCd() : void
        {
            this._avatar.updateCDEffect();
            return;
        }// end function

        public function vipBtnFliter() : void
        {
            var _loc_3:int = 0;
            var _loc_4:int = 0;
            var _loc_1:* = Cache.instance.vip.level;
            if (_loc_1 > 0)
            {
                _loc_3 = Cache.instance.vip.getVipFreeTimesByType(EVipRecordType._EVipRecordTypeDailyGift);
                _loc_4 = 1 - _loc_3;
                if (_loc_4 > 0)
                {
                    EffectManager.glowFilterReg(this._vipBtn);
                    if (VipIcon.isViewShow)
                    {
                        VipIcon.instance.playEffect();
                    }
                    return;
                }
            }
            var _loc_2:int = 1;
            while (_loc_2 <= 10)
            {
                
                if (!Cache.instance.vip.getRewardDic[_loc_2] && _loc_1 >= _loc_2)
                {
                    EffectManager.glowFilterReg(this._vipBtn);
                    if (VipIcon.isViewShow)
                    {
                        VipIcon.instance.playEffect();
                    }
                    return;
                }
                _loc_2++;
            }
            EffectManager.glowFilterUnReg(this._vipBtn);
            if (VipIcon.isViewShow)
            {
                VipIcon.instance.stopEffect();
            }
            return;
        }// end function

        public function updateVipLevel() : void
        {
            this._vipLevel.imgUrl = "vipLevel_" + VipUtil.vipLevel + ".png";
            return;
        }// end function

        public function updateMoney() : void
        {
            var _loc_1:* = Cache.instance.role.money;
            this.setGoldAmount(_loc_1.gold);
            this.setGoldBindAmount(_loc_1.goldBind);
            return;
        }// end function

        public function setGoldAmount(param1:int) : void
        {
            var _loc_2:* = MoneyUtil.getCoinHtml(param1);
            this._goldText.htmlText = _loc_2;
            return;
        }// end function

        public function setGoldBindAmount(param1:int) : void
        {
            var _loc_2:* = MoneyUtil.getCoinHtml(param1);
            this._goldBindText.htmlText = _loc_2;
            return;
        }// end function

        public function showVipExperienceBtn(param1:int) : void
        {
            if (param1 <= 0)
            {
                return;
            }
            if (this._vipExperienceSp == null)
            {
                this._vipExperienceSp = UICompomentPool.getUICompoment(GSprite);
                this._vipExperienceSp.x = 180;
                this._vipExperienceSp.y = 105;
                this.addChild(this._vipExperienceSp);
                if (1800 - param1 < 30)
                {
                    this._vipExperienceSp.x = (SceneRange.display.width - 260) * 0.5;
                    this._vipExperienceSp.y = (SceneRange.display.height - 80) * 0.5;
                    TweenMax.to(this._vipExperienceSp, 3, {x:180, y:105, ease:Quint.easeInOut});
                }
            }
            if (this._vipExperienceBtn == null)
            {
                this._vipExperienceBtn = UIFactory.gLoadingButton(ResFileConst.VipFirstRechargeIcon, 0, 0, 256, 64, this._vipExperienceSp);
                this._vipExperienceBtn.addEventListener(MouseEvent.CLICK, this.openVipWin);
                this._vipExperienceBtn.toolTipData = Language.getString(35356);
            }
            if (this._leftTimeTxt == null)
            {
                this._leftTimeTxt = UIFactory.gTextField(Language.getString(35357), this._vipExperienceBtn.x + 95, this._vipExperienceBtn.y + 52, 60, 20, this._vipExperienceSp, GlobalStyle.textFormatLv);
            }
            if (this._leftTime == null)
            {
                this._leftTime = UIFactory.secTimeView(Language.getString(35033), this._vipExperienceBtn.x + 125, this._vipExperienceBtn.y + 52, 60, 20, this._vipExperienceSp, GlobalStyle.textFormatLv);
                this._leftTime.filters = [FilterConst.glowFilter];
                this._leftTime.autoSize = TextFieldAutoSize.LEFT;
                this._leftTime.mouseEnabled = false;
                this._leftTime.configEventListener(EventName.SecViewTimeChange, this.onSecViewTimeChangeHandler);
                this.updateLeftTime(param1);
            }
            return;
        }// end function

        public function showMainCityExpAddition(param1:SKingOpenExpInfo) : void
        {
            var onMainCitySVTimeChangeHandler:Function;
            var info:* = param1;
            onMainCitySVTimeChangeHandler = function (event:DataEvent) : void
            {
                var _loc_2:* = event.data as int;
                if (_loc_2 <= 0)
                {
                    if (_lt)
                    {
                        _lt.dispose(true);
                        _lt = null;
                    }
                    if (_ltTxt)
                    {
                        _ltTxt.dispose(true);
                        _ltTxt = null;
                    }
                    if (_mainCityExpIcon)
                    {
                        _mainCityExpIcon.dispose(true);
                        _mainCityExpIcon = null;
                    }
                    if (_mainCityExpSp)
                    {
                        _mainCityExpSp.dispose(true);
                        _mainCityExpSp = null;
                    }
                }
                return;
            }// end function
            ;
            var time:* = info.remainSecond;
            if (time <= 0)
            {
                return;
            }
            if (this._mainCityExpSp == null)
            {
                this._mainCityExpSp = UICompomentPool.getUICompoment(ToolTipSprite);
                this._mainCityExpSp.x = 180;
                this._mainCityExpSp.y = 185;
                this.addChild(this._mainCityExpSp);
                this._mainCityExpSp.toolTipData = Language.getString(35358);
            }
            if (1800 - time < 30)
            {
                this._mainCityExpSp.x = (SceneRange.display.width - 260) * 0.5;
                this._mainCityExpSp.y = (SceneRange.display.height - 80) * 0.5;
                TweenMax.to(this._mainCityExpSp, 3, {x:180, y:185, ease:Quint.easeInOut});
            }
            if (this._mainCityExpIcon == null)
            {
                this._mainCityExpIcon = UIFactory.gImageBitmap(ImagesConst.MainCityExpIcon, 0, 0, this._mainCityExpSp);
            }
            if (this._ltTxt == null)
            {
                this._ltTxt = UIFactory.gTextField(Language.getString(35357), 95, 52, 60, 20, this._mainCityExpSp, GlobalStyle.textFormatLv);
            }
            if (this._lt == null)
            {
                this._lt = UIFactory.secTimeView(Language.getString(35033), 125, 52, 60, 20, this._mainCityExpSp, GlobalStyle.textFormatLv);
                this._lt.filters = [FilterConst.glowFilter];
                this._lt.autoSize = TextFieldAutoSize.LEFT;
                this._lt.mouseEnabled = false;
                this._lt.configEventListener(EventName.SecViewTimeChange, onMainCitySVTimeChangeHandler);
                this._lt.setLeftTime(time > 0 ? (time) : (0));
            }
            return;
        }// end function

        private function updateLeftTime(param1:int) : void
        {
            var _loc_2:int = 0;
            if (param1 > 0)
            {
                _loc_2 = param1;
            }
            this._leftTime.setLeftTime(_loc_2);
            return;
        }// end function

        private function onSecViewTimeChangeHandler(event:DataEvent) : void
        {
            var _loc_2:* = event.data as int;
            if (_loc_2 <= 0)
            {
                this.hideVipExperienceBtn();
            }
            return;
        }// end function

        public function hideVipExperienceBtn() : void
        {
            if (this._vipExperienceSp)
            {
                this._vipExperienceSp.dispose(true);
                this._vipExperienceSp = null;
            }
            if (this._vipExperienceBtn)
            {
                this._vipExperienceBtn.removeEventListener(MouseEvent.CLICK, this.openVipWin);
                this._vipExperienceBtn.dispose(true);
                this._vipExperienceBtn = null;
            }
            if (this._leftTime)
            {
                this._leftTime.dispose(true);
                this._leftTime = null;
            }
            if (this._leftTimeTxt)
            {
                this._leftTimeTxt.dispose(true);
                this._leftTimeTxt = null;
            }
            return;
        }// end function

        public function updateAvatar() : void
        {
            this._avatar.updateAvatar();
            return;
        }// end function

        override public function stageResize() : void
        {
            this.x = 0;
            this.y = 0;
            return;
        }// end function

    }
}
